FROM anapsix/alpine-java:21_server-jre_unlimited

LABEL maintainer="huangjianbing"

RUN mkdir -p /www/wwwroot/project/logs \
    /www/wwwroot/project/temps \
    /www/wwwroot/project/uploads

WORKDIR /www/wwwroot/project

#ENV SERVER_PORT=8088 #测试
ENV PROFILES_ACTIVE="test"

#开启8088端口
EXPOSE 8088

ADD ./target/project-app.jar ./project-app.jar

ENTRYPOINT ["java", \
            "-Djava.security.egd=file:/dev/./urandom", \
            "-Dspring.profiles.active=${PROFILES_ACTIVE}", \
            "-jar", "project-app.jar"]
